
class CKSSDriver : public CBaseDriver {
	private:
		CKSSMMU_Program prg_space;
		CKSSMMU_IO      io_space;
		KSSHeader* header;
		CMemory* mem;
		ICpu* z80;
		ISoundDevice* ay;
		CKonamiSCC* scc;
		ISoundDevice* opll;
		ISoundDevice* audio;
		ISoundDevice* moonsound;
	
	private:
		UINT16 load;
		UINT16 codesize;
		UINT16 init;
		UINT16 play;

	private:
		CMemory* main_code;
		CMemory* bank_code;
	
	private:
		void Reset();

	public:
		int Load(const char* fn);
		int Init(CHardware* hard);
		void FreeUnusedResources();
		void SetSubsong(int song);
		void Close();
};